import Layout from '../pages/layout'
export const asyncRoutesMap = [
  {
    path: '/',
    component: Layout,
    redirect: '/home',
    meta: {
      userId: [0, 1, 2]
    },
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import('@/pages/home'),
        meta: {
          title: '首页',
          icon: 'home',
          userId: [0, 1, 2]
        }
      }
    ]
  },
  {
    path: '/ems',
    component: Layout,
    redirect: '/ems/echarts',
    meta: {
      userId: [0, 2]
    },
    children: [
      {
        path: 'echarts',
        name: 'echarts',
        component: () => import('@/views/Echarts'),
        meta: {
          title: '图表',
          icon: 'home',
          userId: [0, 2]
        }
      }
    ]
  },
  {
    path: '/vms',
    component: Layout,
    redirect: '/vms/vip',
    meta: {
      userId: [0, 1, 2]
    },
    children: [
      {
        path: 'vip',
        name: 'vip',
        component: () => import('@/pages/vip'),
        meta: {
          title: '首页',
          icon: 'home',
          userId: [0, 1, 2]
        }
      }
    ]
  },
  {
    path: '/goods',
    component: Layout,
    redirect: '/goods/list',
    meta: {
      userId: [0, 1, 2]
    },
    children: [
      {
        path: 'list',
        name: 'list',
        component: () => import('@/pages/goods/list'),
        meta: {
                title: '商品列表',
                icon: 'home',
                userId: [0, 1, 2]
              }
      },
      {
        path: 'add',
        name: 'add',
        component: () => import('@/pages/goods/add'),
        meta: {
                title: '商品添加',
                icon: 'home',
                userId: [0, 1]
              }
      },
      {
        path: 'edit',
        name: 'edit',
        component: () => import('@/pages/goods/edit'),
        meta: {
                title: '商品编辑',
                icon: 'home',
                userId: [0, 1]
              }
        }
    ]
  }
]
